package com.hxkj.client.service;

import com.hxkj.domain.po.*;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(name = "cms-article")
public interface GeneratorStaticFileServiceClient {

    @RequestMapping(value = "/createFile/genfile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct genFile(@RequestBody String params) throws Exception;

    @RequestMapping(value = "/createFile/genArticleFile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    void GenArticleFile(@RequestBody List<Article> list) throws Exception;

    @RequestMapping(value = "/createFile/genChannelFile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    void GenChannelFile(@RequestBody List<Channel> list) throws Exception;

    @RequestMapping(value = "/createFile/genColumnFile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    void GenColumnFile(@RequestBody List<Column> list) throws Exception;

    @RequestMapping(value = "/createFile/genLeafletFile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct GenLeafletFile(@RequestBody Leaflet leaflet);

    @RequestMapping(value = "/createFile/genTagInfoFile", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    void GenTagInfoFile(@RequestBody List<Tags> list) throws Exception;

    @RequestMapping(value = "/createFile/createSiteAll", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct createSiteAll(@RequestBody FreeMarker freeMarker);


    /**
     * 根据文章生成静态HTML页面
     *
     * @param article
     * @return
     */
    @RequestMapping(value = "/createFile/generateArticleHTML", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct generateArticleHTML(Article article);
}